using Microsoft.AspNetCore.Authorization;

namespace WebApplication1.Auth;

public class TestMustRoleAdminHandle:AuthorizationHandler<TestAdminRequirement>
{
    
    protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, TestAdminRequirement requirement)
    {
        // context.Succeed(requirement);
        return Task.CompletedTask;        // 直接这么返回，会返回 403
    }
}